<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ page import="com.yaodian100.ec.member.entity.Member"%>
<%@ page import="org.apache.commons.lang.StringUtils"%>

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.yaodian100.com/jsp/yaodian100" prefix="yaodian100" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<c-rt:set var="frontContextPath" value='<%=ServerValue.getFrontContextPath()%>' />

<script language="javascript">
	$().ready(function(){
		$("#current_location").html('&nbsp;&gt;&nbsp;我的礼品卡&nbsp;-&nbsp;礼品卡交易纪录');
		$("#list_li").attr('class','mb-tab-f');
		$("#recharge_li").removeAttr('class');
	});
</script>

<!-- 帳戶狀況 -->
<p class="bg-yl" align="right">共${virtualBalanceSize}笔： ${pager.currentPage+1}/${pager.pageSize}
<c-rt:choose><c-rt:when test="${pager.currentPage==0}">
	<span class="a-no">&lt; 上一页</span> |
</c-rt:when><c-rt:otherwise>
	<a href="${frontContextPath}/member/myGiftcard/tomygiftcard.do?pager.currentPage=${pager.currentPage-1}">&lt; 上一页</a> |
</c-rt:otherwise></c-rt:choose>
<c-rt:choose><c-rt:when test="${pager.currentPage == pager.pageSize-1}">
	<span class="a-no">下一页 &gt;</span>
</c-rt:when><c-rt:otherwise>
	<a href="${frontContextPath}/member/myGiftcard/tomygiftcard.do?pager.currentPage=${pager.currentPage+1}" class="a-togo">下一页 &gt;</a>
</c-rt:otherwise></c-rt:choose>
</p>
<table width="100%" border="0" class="tb-2">
	<tr>
		<th width="100">日期</th>
		<th>说明</th>
		<th width="90">金额</th>
		<th>余额</th>
	</tr>
	<c-rt:choose><c-rt:when test="${virtualBalanceSize==0}">
		<tr><td colspan="4">您没有任何记录。</td></tr>
	</c-rt:when><c-rt:otherwise>
	<c-rt:forEach items="${virtualBalances}" var="virtualBalance">
		<tr>
			<td><fmt:formatDate value="${virtualBalance.trxDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			<td>
				<p>${virtualBalance.description}</p>
			</td>
			<td class="txt-price"><fmt:formatNumber value="${virtualBalance.trxAmount}" pattern="#####0.0#"/></td>
			<td class="txt-price"><fmt:formatNumber value="${virtualBalance.summaryAmount}" pattern="#####0.0#"/></td>
		</tr>
	</c-rt:forEach>
	</c-rt:otherwise></c-rt:choose>
</table>

<yaodian100:pager10 pagerObj="${pager}" link="${frontContextPath}/member/myGiftcard/tomygiftcard.do"/>